From e1ef8b49c7700e8c8039b12aaabd16464ca3fb8f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 28 Oct 2004 02:01:57 +0000 Subject: [PATCH] Sort results before comparison, as search is not guaranteed to return results in a particular result. --- tests/SearchEngineTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/SearchEngineTest.php b/tests/SearchEngineTest.php index 3e040250d8..0a04bf478e 100644 --- a/tests/SearchEngineTest.php +++ b/tests/SearchEngineTest.php @@ -51,6 +51,10 @@ END $matches[] = IntVal( $row->cur_id ); } $results->free(); + # Search is not guaranteed to return results in a certain order; + # sort them numerically so we will compare simply that we received + # the expected matches. + sort( $matches ); return $matches; } -- 2.20.1